package spring.boot.auto.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import spring.boot.annotation.EnableInto;
import spring.boot.factory.WebServletFactory;
import spring.boot.factory.impl.TomcatWebServletFactory;

/**
 * @ClassName ServletAutoConfig
 * @Description TODO
 * @Author Toolck Rin
 * @Date 2021/3/10 22:51
 * @Version 1.0
 **/
@EnableInto(ServletAutoConfigProperties.class)
public class ServletAutoConfig {
    @Autowired
    private ServletAutoConfigProperties servletAutoConfigProperties;

    @Bean
    public WebServletFactory tomcatWebServletFactory() {
        WebServletFactory webServletFactory = new TomcatWebServletFactory(servletAutoConfigProperties);
        return webServletFactory;
    }

}
